
    import request from '@/utils/request'
    // 查询专业信息表列表
    export const listMajor = (query) => {
    return request({
        url: '/system/major/list',
        method: 'get',
        params: query
    })
    }
    // 查询专业信息表详细
    export const getMajor = (majorId) => {
    return request({
        url: '/system/major/' + majorId,
        method: 'get'
    })
    }
    
    // 新增专业信息表
    export const addMajor = (data) => {
    return request({
        url: '/system/major',
        method: 'post',
        data: data
    })
    }

    // 修改专业信息表
    export const updateMajor = (data) => {    
    return request({
        url: '/system/major',
        method: 'put',
        data: data
    })
    }

    // 删除专业信息表
    export const delMajor = (majorId) => {  
    return request({
        url: '/system/major/' + majorId,
        method: 'delete'
    })
    }
    
    // 导出专业信息表
    export const exportMajor = (data) => {
    return request({
        url: '/system/major/export',
        method: 'post',
        data: data
    })
    }
    // 查询年级下的专业列表
    export const listByGrade = (gradeId) => {
    return request({
        url: '/system/major/listByGrade/' + gradeId,
        method: 'get'
    })
    }
    